package com.order.feign;


import com.common.domain.pojo.Result;
import com.common.feign.OpenFeignRequestPrefix;
import com.order.domain.pojo.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "eselect-user-service")
public interface UserFeignClient {

    // 获取指定用户基本信息
    @GetMapping(OpenFeignRequestPrefix.USER_SERVICE + "/info")
    Result<UserInfo> querySelectUserInfoById(@RequestParam(name = "id", required = false) Long id);

    // 查询用户信息列表 根据用户id集合  key=用户id value=用户信息
    @PostMapping(OpenFeignRequestPrefix.USER_SERVICE + "/detail/list")
    Result<Map<Long, UserInfo>> querySelectUserListByIds(@RequestBody List<Long> ids);


}
